package main

import (
	"fmt"
	"google.golang.org/grpc"
	"net"
	"qq_service/end_email/protobuf/pb"
	"qq_service/end_email/server"
)

const Address = ":5000"

func main() {
	listen, err := net.Listen("tcp", Address)
	if err != nil {
		fmt.Println(err)
	}
	s := grpc.NewServer()                                    //新建服务器
	pb.RegisterSendMailServiceServer(s, &server.SendEmail{}) //注册服务器
	s.Serve(listen)                                          //服务
}
